import { Component, OnInit } from '@angular/core';
import { TreeModule, TreeNode } from 'primeng/primeng';
import { RouterModule, Routes, Router, ActivatedRoute, ParamMap } from '@angular/router';
import { MdlDialogService, MdlDialogReference, MdlSnackbarService } from '@angular-mdl/core';


@Component({
  templateUrl: './form.component.html',
  styleUrls: ['./form.component.scss'],
  providers: []
})
export class FormComponent implements OnInit {
  selectedIndex: number = 0;
  items : any[] = []
  constructor(
    private router: Router,
    private route: ActivatedRoute) {
  }

  ngOnInit() {
    this.items.push({'routerLink': '/form/design', 'label': '表单设计', 'icon': 'fa fa-language'});
    this.items.push({'routerLink': '/form/authority', 'label': '表单权限', 'icon': 'fa fa-shield'});
    this.items.push({'routerLink': '/form/repository', 'label': '表单仓库', 'icon': 'fa fa-ils'});
  }

  /** 点击菜单项 */
  itemClick(item: any, index: number) {
    this.selectedIndex = index;
  }
}
